#include "myapplication.h"
#include "visualisation.h"

int main(int, char **)
{
	Visualisation * v = new Visualisation;
    MyApplication * application = new MyApplication();
	v->setApplication(application);
	application->setVisualisation(v);
    try
    {
        application->addResourceLocationFrom("resources.cfg");
        application->create("plugins.cfg","ogre.cfg","ogre.log",ST_GENERIC);
        application->run();
    }
    catch (Exception& e)
    {
        ErrorDialog* dlg = PlatformManager::getSingleton().createErrorDialog();
        dlg->display(e.getFullDescription());
        delete dlg;
		delete v;
		delete application;
        return 1;
    }
	
    return 0;
}
